package com.campus.schedule.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.campus.common.mybatis.entity.IntegerIdBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户优惠券表
 * </p>
 *
 * @author ZhaoYuJie
 * @since 2025-05-12
 */
@Getter
@Setter
@TableName("user_coupon")
@ApiModel(value = "UserCoupon对象", description = "用户优惠券表")
public class UserCoupon extends IntegerIdBaseEntity<UserCoupon> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户ID")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("优惠券ID")
    @TableField("coupon_id")
    private Integer couponId;

    @ApiModelProperty("状态：0-未生效，1-可用，2-已使用，3-已过期")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("使用开始时间")
    @TableField("use_start_time")
    private LocalDateTime useStartTime;

    @ApiModelProperty("使用结束时间")
    @TableField("use_end_time")
    private LocalDateTime useEndTime;

    @ApiModelProperty("使用时间")
    @TableField("use_time")
    private LocalDateTime useTime;

    @ApiModelProperty("使用订单ID")
    @TableField("order_id")
    private String orderId;

    @ApiModelProperty("领取时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Override
    public Serializable pkVal() {
        return null;
    }
}
